<?php

class KTDContext extends sfContext{
    public function initialize(sfApplicationConfiguration $configuration){
        parent::initialize($configuration);

        if($this->getUser()->isAuthenticated()){
            $this->getUser()->getGuardUser()->setPresence(new Doctrine_Expression('NOW()'));
            $this->getUser()->getGuardUser()->save();

            //on met la présence au temps actuel
            OldNewStuffManager::getSingleton()->setUser($this->getUser());
        }
        
    }

}
?>
